﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LX.Core.Utils
{
    public  class Helper
    {
        public static bool StringIsEmpty(String txt)
        {
            if (txt == null)
            {
                return true;
            }
            return String.IsNullOrWhiteSpace(txt);
        }

        public static bool ArrayIsEmpty(IList list)
        {
            if (list == null)
            {
                return true;
            }
            return list.Count == 0;
        }

        public static List<T> EnumToList<T>()
        {
            List<T> list = new List<T>();
            foreach (var o in Enum.GetValues(typeof(T)))
            {
                list.Add((T)o);
            }
            return list;
        }
    }
}
